package day019.ioStream;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class FileInputStreamDemo6 {
    public static void main(String[] args) {
        try (
                FileInputStream fis = new FileInputStream("D:\\ideaProjects\\javase_code\\study-practice\\" +
                        "src\\day019\\ioStream\\day019_demo\\a.txt");
//                FileOutputStream fos = new FileOutputStream("D:\\ideaProjects\\javase_code\\study-practice\\" +
//                        "src\\day019\\ioStream\\day019_demo\\test4.jpg");
        ) {
            byte[] bys = new byte[3];
            int len;
            while ((len = fis.read(bys)) != -1) {
                System.out.println(new String(bys, 0, len));
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
